# -*- coding: utf-8 -*-
"""
Created on Sun Jan  2 11:58:08 2022

@author: Administrator
"""

import pandas as pd
import numpy as np
import os


# -*- coding: utf-8 -*-
"""
Created on Sat Jan  1 12:38:47 2022

@author: Administrator
"""

import pandas as pd
import numpy as np
import os

path = r'C:\Users\Administrator\Desktop\三公司账龄汇总'
file = '2016年至2021年12月23日应收账款借方余额-刘燕.xls'
os.chdir(path)

df = pd.read_excel(
        file,
        sheet_name = '2016-2021年应收账款',
        header = 1
        )
df = df[df['核算组']=='三公司']

汇总 = set([str(x) + '_' +str(y) for x,y in zip(df['客商辅助核算名称'],df['2017年账面应收余额'],)])
汇总金额 = set(df['2017年账面应收余额'])

df1 = pd.read_excel(
        file,
        sheet_name = '2017年应收账款',
        header = 2
        )
df1 = df1[df1['核算组']=='三公司']
df1.columns
原始 = set([str(x) + '_' +str(y) for x,y in zip(df1['客商辅助核算名称'],df1['账面应收余额'])])
原始金额 = set(df1['账面应收余额'])

res_customer = list(原始 - 汇总)
res_money = list(原始金额 - 汇总金额)